﻿using BlogSystem.Mediator.Handler;

namespace BlogSystem.Mediator.Mediator;

/// <summary>
/// 中介者接口
/// </summary>
public interface IMediator
{
    Task PublishAsync<TNotification>(TNotification notification) where TNotification : INotification;
    Task SubscribeAsync<TNotification>(INotificationHandler<TNotification> handler) where TNotification : INotification;
    Task UnsubscribeAsync<TNotification>(INotificationHandler<TNotification> handler) where TNotification : INotification;
}